<template>
  <div class="card-mode">
    <div class="title">
      <span class="text">{{ title }}</span>
      <div class="more active" v-if="more" @click="$emit('more')">
        <span>{{ more }}</span>
        <span class="i-carbon-chevron-right icon"></span>
      </div>
    </div>
    <div class="card-content">
      <slot />
    </div>
  </div>
</template>
<script setup lang="ts">
defineOptions({ name: 'CardMode' })

defineProps({
  title: {
    type: String,
    default: '',
  },
  more: {
    type: String,
    default: '',
  },
})
</script>
<style lang="scss" scoped>
.card-mode {
  margin: 30rpx 30rpx 0;
  background-color: #fff;
  border-radius: 30rpx;
  .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 112rpx;
    padding: 0px 8rpx 0px 23rpx;
    color: var(--color1);
    .text {
      font-size: 30rpx;
      font-weight: 700;
    }
    .more {
      display: flex;
      align-items: center;
      font-size: 26rpx;
      .icon {
        font-size: 30rpx;
      }
    }
  }

  .card-content {
    padding: 23rpx;
  }
}
</style>
